package com.yuan.spring.mvc;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by yeg on 2017/9/8.
 */
@RestController
public class ErrorPageNotFund {

    /**
     * 采用 * 做拦截当所有连接都不匹配时匹配这个 '最不优'的选项 即404了...
     */
    @RequestMapping("*")
    public ResponseMsg PageNotFound() {
        return new ResponseMsg("0", "", "请求链接不正确");
    }

}
